<template>
  	<header class="header">
				<h1>todos</h1>
				<input class="new-todo" placeholder="What needs to be done?" autofocus
        v-model.trim="info" 
        @keyup.enter="add"
         >
			</header>
</template>

<script>
export default {
  data(){
    return{
      info:''
    }
  },
  methods:{
    add(){
      this.$emit('addFn',this.info)
      this.info=''
    }
    }
  }

</script>

<style>

</style>